package day5;

public class Salesman extends Employee{
    private int earnings; // 基本工资
    private int sale;  // 销售提成

    public Salesman(String name, String sex, String date, int earnings, int sale) {
        super(name, sex, date);
        this.earnings = earnings;
        this.sale = sale;
    }

    public int getEarnings() {
        return earnings;
    }

    public void setEarnings(int earnings) {
        this.earnings = earnings;
    }

    public int getSale() {
        return sale;
    }

    public void setSale(int sale) {
        this.sale = sale;
    }

    //输出：销售员 赵六 本月工资为 5000.0 元。
    public void computeSalary() {
        System.out.println("销售员 " + this.getName() + " 本月工资为 " + (this.getSale()+this.getEarnings()));
    }
}
